<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>导航栏</title>
    <style>
        ul li{
            border: 1px solid red;
            width: 100px;
            list-style: none;
            text-align: center;
            padding: 10px;
            float: left;
        }
        ul li a{
            text-decoration: none;
        }
        ul li:hover{
            background: greenyellow;
        }
        ul li:hover a{
            background: purple;
        }
    </style>
</head>
<body>
    <ul>
        <li>
            <a href="#">首页</a>
        </li>
        <li>
            <a href="#">门户</a>
        </li>
        <li>
            <a href="#">论坛</a>
        </li>
        <li>
            <a href="#">招聘</a>
        </li>
    </ul>
</body>
</html>